<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>ES6箭头函数</title>
		<script type="text/javascript">
			//1.无参函数
			var js0 =function(){
				console.log("js0无参函数调用")
			}
			js0(); //调用函数
			//箭头函数
			//var es60 =() =>{
			//	console.log("es60箭头函数无参调用");
			//}
			var es60 =()=> console.log("es60箭头函数无参调用")
			es60();
		    //1.一个参数函数
			var js1 =function(arg){
				return arg;
			}
			var s=js1("js1 一个参数的函数");
			console.log(s);
			
			//var es61=(arg)=>{
			//	return "es61"+arg;
			//}
			var es61=(arg)=>"es61 123" +arg;
			var e1=es61("一个参数的函数");
			console.log(e1);
			//1.两个参数函数
			var js2 =function(arg1,arg2){
				return arg1+","+arg2;
			}
			var js2=js2("刘德华","周慧敏");
			console.log(js2);
			//var es62=(arg1,arg2)=>{
			//	return arg1+","+arg2;
			//}
			var es62=(arg1,arg2)=>arg1+","+arg2;
			var e2=es62("js2的第一个参数","js2的第二个参数");
			console.log(e2);
			
		</script>
	</head>
	<body>
	</body>
</html>
